<?php
error_reporting(E_ALL ^ E_NOTICE);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body bgcolor="#000000">
<?php
if($_POST['registe']){
	$getuser = $_POST['User_name'];
	$getfirst = $_POST['First_name'];
	$getlast = $_POST['Last_name'];
	$getpass = $_POST['password'];
	$getconPass = $_POST['C_pass'];
	$getmail = $_POST['email'];
	$getgend = $_POST['sex'];
	$getday = $_POST['day'];
	$getmonth = $_POST['month'];
	$getyear = $_POST['Year'];
	$getcountry = $_POST['country'];
	if($getuser){
		if($getfirst){
			if($getlast){
				if($getpass){
					if($getconPass){
						if($getmail){
							if($getgend){
								if($getday){
									if($getmonth){
										if($getyear){
											if($getcountry){
												if((strlen($getmail)>=7) && (strstr($getmail,"@")) && (strstr($getmail,".com"))){
													if($getpass === $getconPass){
														require("file:///C|/Users/Amal/AppData/Local/Temp/tech.php");
														$query=mysql_query("SELECT * FROM student WHERE mail='$getmail'");
														$numrows = mysql_num_rows($query);
														if($numrows == 0){
															$insert=mysql_query("INSERT INTO student (id,user_name,first_name,last_name,password,mail,gender,day,month,year,country) VALUES ('','$getuser','$getfirst','$getlast','$getpass','$getmail','$getgend','$getday','$getmonth','$getyear','$getcountry')");
															if($insert){
																$mass="Your account created succs";
															}
															else
															$errorAcc="Your account not created..";
														}
														else
														$errormsgEm="That email is already exist..";
														mysql_close();
													}
													else
													$errormsgPCP="Your passwords did not match.";
												}
												else
												$errormsgEe="Please enter a valid e-mail.";
											}
											else
											$errormsgC="Choose your country please..";
										}
										else
										$errormsgY="Please enter year of birth date";
									}
									else
									$errormsgM="Please choose a month of birth date.";
								}
								else
								$errormsgD="Please choose a day of birth date.";
							}
							else
							$errormsgG="Please choose you gender..";
						}
						else
						$errormsgE="You must enter an e-mail to can register..";
					}
					else
					$errormsgCP="You must enter retype password to can register.";
				}
				else
				$errormsgP="You must enter your password to can register.";
			}
			else
			$errormsgL="You must enter your last name to can register.";
		}
		else 
		$errormsgF="You must enter your first name to can register.";
	}
	else
	$errormsgU = "You must enter your user name to can register.";
}
	
	
$form="<form id='Reg_form' name='Reg_form' method='POST' action='./registration.php'>
<table width='75%' border='0' align='center' bgcolor='#980000' height=
'100%' cellpadding='3' cellspacing='3'>
  <tr width='500' height='100'>
    <td  colspan='4' rowspan='2' background='4.jpg'>
    </td>
  </tr>
  <tr>
  <td></td>
  <td><font color='#FF0000'>$errorAcc</font></td>
  </tr>
  <tr>
  <tr>
    <td width='39%' height='36' align='right' valign='top' size='30%'>
    <font size='5' color='#ffffff'>
    User Name:
    </font>
    </td>
    <td><input name='User_name' type='text' value='$getuser' size='50' />
  </tr>
  <tr>
  <td></td>
  <td><font color='#ff0000'>$errormsgU</font></td>
  </tr>
  <tr>
    <td width='39%' height='36' align='right' valign='top' size='30%'>
    <font size='5' color='#ffffff'>
    First Name:
    </font>
    </td>
    <td><input name='First_name' type='text' value='$getfirst' size='50' /></td>
  </tr>
   <tr>
  <td></td>
  <td><font color='#FF0000'>$errormsgF</font></td>
  </tr>
  <tr>
    <td width='39%' height='36' align='right' valign='top' size='30%'>
    <font size='5' color='#ffffff'>
    Last Name:
    </font>
    </td>
    <td><input name='Last_name' type='text' value='$getlast' size='50' /></td>
  </tr>
   <tr>
  <td></td>
  <td><font color='#FF0000'>$errormsgL</font></td>
  </tr>
  <tr>
    <td width='39%' height='36' align='right' valign='top' size='30%'>
    <font size='5' color='#ffffFF'>
    Password:
    </font>
    </td>
    <td><input name='password' type='password' value='' size='50' /></td>
  </tr>
   <tr>
  <td></td>
  <td><font color='#FF0000'>$errormsgP</font></td>
  </tr>
  <tr>
    <td width='39%' height='36' align='right' valign='top' size='30%'>
    <font size='5' color='#ffffFF''>
    Confirm Password:
    </font>
    </td>
    <td><input name='C_pass' type='password' value='' size='50' /></td>
  </tr>
   <tr>
  <td></td>
  <td><font color='#FF0000'>$errormsgCP</font></td>
  </tr>
   <tr>
  <td></td>
  <td><font color='#FF0000'>$errormsgPCP</font></td>
  </tr>
  <tr>
    <td width='39%' height='36' align='right' valign='top' size='30%'>
    <font size='5' color='#ffffFF'>
    E-mail:
    </font>
    </td>
    <td><input name='email' type='text' valuse='$getmail' size='50' /></td>
  </tr>
   <tr>
  <td></td>
  <td><font color='#FF0000'>$errormsgE $errormsgEe $errormsgEm</font></td>
  </tr>
  <tr>
    <td width='39%' height='36' align='right' valign='center' size='30%'>
    <font size='5' color='#ffffFF'>
    Gender:
    </font>
    </td>
    <td>
&nbsp;<input type='radio' name='sex' value='male' id='choose' /> 
<font size='5' color='#ffffFF'>
Male
</font>
&nbsp;&nbsp;&nbsp;
<input type='radio' name='sex' value='female' />
<font size='5'  color='#ffffFF'> 
Female
</font>
</td>
  </tr>
   <tr>
  <td></td>
  <td><font color='#FF0000'>$errormsgG</font></td>
  </tr>
  <tr>
    <td width='39%' height='36' align='right' valign='top' size='30%'>
    <font size='5' color='#ffffFF'>
    Birth of date:
    </font>
    </td>
    <td>
<select name='day'>
                    <option   value='$getday' selected>-Select Day-</option>
							    <option title='1'  value='1'>1</option>
								<option title='2'  value='2'>2</option>
								<option title='3'  value='3'>3</option>
								<option title='4'  value='4'>4</option>
								<option title='5'  value='5'>5</option>
								<option title='6'  value='6'>6</option>
								<option title='7'  value='7'>7</option>
								<option title='8'  value='8'>8</option>
								<option title='9'  value='9'>9</option>
								<option title='10' value='10'>10</option>
								<option title='11' value='11'>11</option>
								<option title='12' value='12'>12</option>
								<option title='13' value='13'>13</option>
								<option title='14' value='14'>14</option>
								<option title='15' value='15'>15</option>
								<option title='16' value='16'>16</option>
								<option title='17' value='17'>17</option>
								<option title='18' value='18'>18</option>
								<option title='19' value='19'>19</option>
								<option title='20' value='20'>20</option>
								<option title='21' value='21'>21</option>
								<option title='22' value='22'>22</option>
								<option title='23' value='23'>23</option>
								<option title='24' value='24'>24</option>
								<option title='25' value='25'>25</option>
								<option title='26' value='26'>26</option>
								<option title='27' value='27'>27</option>
								<option title='28' value='28'>28</option>
								<option title='29' value='29'>29</option>
								<option title='30' value='30'>30</option>
								<option title='31' value='31'>31</option>
</select>						
<select name='month' title='- Select Month -'> 
                              <option title='- Select Month -' value='$getmonth' SELECTED >- Select Month -</option>
                              <option title='January'   value='1'   >January</option>
                              <option title='February'  value='2'   >February</option>
                              <option title='March'     value='3'   >March</option>
                              <option title='April'     value='4'   >April</option>
                              <option title='May'       value='5'   >May</option>
                              <option title='June'      value='6'   >June</option>
                              <option title='July'      value='7'   >July</option>
                              <option title='August'    value='8'   >August</option>
                              <option title='September' value='9'   >September</option>
                              <option title='October'   value='10'  >October</option>
                              <option title='November'  value='11'  >November</option>
                              <option title='December'  value='12'  >December</option>
</select>
<input name='Year' type='text' title='Year' value='$getyear'  size='13%' aria-required='true' placeholder='Year' aria-label='Year'>
</td>
  </tr>
   <tr>
  <td></td>
  <td><font color='#FF0000'>$errormsgD $errormsgM $errormsgY</font></td>
  </tr>
  <tr>
    <td width='39%' height='36' align='right' valign='top' size='30%'>
    <font size='5' color='#ffffFF'>
    Country:
    </font>
    </td>
    <td>
<select name='country' title='-Select Country-'>
                              <option title='-Select country-' value='$getcountry' selected>-Select country- </option>
							    <option  value='Afghanistan1'>Afghanistan</option>
								<option  value='Argentina'>Argentina</option>
								<option  value='Bahrain'>Bahrain</option>
								<option  value='Brazil'>Brazil</option>
								<option value='China'>China</option>
								<option  value='Colombia'>Colombia</option>
								<option  value='Denmark'>Denmark</option>
								<option  value='Ecuador'>Ecuador</option>
								<option value='Egypt'>Egypt</option>
								<option value='France'>France</option>
								<option value='Germany'>Germany</option>
								<option value='Ghana'>Ghana</option>
								<option value='Hong Kong'>Hong Kong</option>
								<option value='India'>India</option>
								<option value='Japan'>Japan</option>
								<option value='Kenya'>Kenya</option>
								<option value='Kuwait'>Kuwait</option>
								<option value='Lebanon'>Lebanon</option>
								<option value='Mali'>Mali</option>
								<option value='Mexico'>Mexico</option>
								<option value='Netherlands'>Netherlands</option>
								<option value='Oman'>Oman</option>
								<option value='Peru'>Peru</option>
								<option value='Qatar'>Qatar</option>
								<option value='Russia'>Russia</option>
								<option value='Saudi Arabia'>Saudi Arabia</option>
								<option value='Spain'>Spain</option>
								<option value='United States'>United States</option>
								<option value='Yemen'>Yemen</option>
								<option value='Zambia'>Zambia</option>
								<option value='Zimbabwe'>Zimbabwe</option>
</select>
</td>
  </tr>
   <tr>
  <td></td>
  <td><font color='#FF0000'>$errormsgC</font></td>
  </tr>
  <tr>
    <td align='center' colspan='2'><a href='log in.php' target='self'>
        <input type='button' size='50' name='registe' value='        Register        ' style='background:#FCF' />
          </a></label>
          </strong> <br>
      </p>
 <tr>
  <td></td>
  <td><font color='#FF0000'>$mass</font></td>
  </tr>
   </td>
  </tr>
 
 
  <td align='center' colspan='2'>
<font face='Snap ITC' size='3' color='#ffffFF'>
<B>
<h3 align='center'> CopyRight© 2014</h3>
      </B>
      </font>
      </td></tr>
  </table>
</form>";

echo $form;
?>  

<body>
</body>
</html>